﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace JQueryWidget.WidgetFrame.Widgets
{
    public partial class CalendarWidget : WidgetFrame.Common.WidgetControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Calendar1.SelectedDate = DateTime.Now;
                SelectedDateTextBox.Text = Calendar1.SelectedDate.ToShortDateString();
            }
        }

        protected void Calendar1_SelectionChanged(object sender, EventArgs e)
        {
            SelectedDateTextBox.Text = Calendar1.SelectedDate.ToShortDateString();
        }
    }
}